package org.adorsys.aderp.orga.domain;

import javax.persistence.Column;
import javax.persistence.ManyToOne;
import javax.persistence.PrePersist;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaEntity
public class Country {

    @NotNull
    @Column(name = "iso3CodeBk", unique = true)
    @Size(min = 3, max = 3)
    private String iso3Code;

    @NotNull
    @Column(name = "iso2CodeImtble", unique = true)
    @Size(min = 2, max = 2)
    private String iso2Code;

    @NotNull
    @ManyToOne
    private CurrencyInstance currencyInstance;

    private String title;

    private String description;

    @NotNull
    @ManyToOne
    private Continent continent;
}
